package com.chat.http.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.chat.http.service.PeopleService;

@Controller
@RequestMapping("/")
public class IndexController {
	
	@Autowired
	private PeopleService peopleService;

	@RequestMapping(value = "index")
	@ResponseBody
	public Map<String, String> index() {
		Map<String, String> map = new HashMap<String, String>();
		map.put("name", peopleService.findById( 1 ));
		return map;
	}

}
